import Vue from 'vue'
import Vuex from 'vuex'
import creatLogger from 'vuex/dist/logger'

Vue.use(Vuex)

import UserInfo from './userInfo'
import Article from './article'
import Address from './address'
import StoreAndGoods from './storeAndGoods'

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  modules: {
    UserInfo,
    Article,
    Address,
    StoreAndGoods
  },
  plugins: debug ? [creatLogger()] : []
})
